package day1;

import java.util.ArrayList;
import java.util.Collection;

/**
 * ClassName：StudentTest
 *
 * @Author：小鱼
 * @Create：2025-08-11 14:06
 */
public class StudentTest {
    public static void main(String[] args) {
        //创建一个集合，用于存放学生对象
        Collection<Student> coll = new ArrayList();
        //创建学生对象
        Student s1 = new Student("张三",18);
        Student s2 = new Student("李四",20);
        Student s3 = new Student("李四",20);

        //存放
        coll.add(s1);
        coll.add(s2);
       // coll.add(s3);


        boolean flag1 = coll.contains(s3);
        System.out.println("s3:"+flag1);

        coll.remove(s3);

        System.out.println(coll.size());
        System.out.println(coll);
    }
}
